import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';

import '../component/dialog/loading_dialog.dart';



/// @author zavier
/// @time 2022/6/28 12:07
/// @des 加载框工具类

class LoadingUtils {
  LoadingUtils._();
  static void showLoading({
    VoidCallback? onDismiss,
  }) {
    SmartDialog.showLoading(builder: (context) => const LoadingDialog(), onDismiss: onDismiss);
  }
  /// 隐藏加载框
  static void dismiss(){
    SmartDialog.dismiss(status: SmartStatus.loading);
  }
}
